We first summarize the basic structure of the outer distribution module of acompletely regular code. Then, employing a simple lemma concerning eigenvectorsin association schemes, we propose to study the tightest case, where theindices of the eigenspace that appear in the outer distribution module areequally spaced. In addition to the arithmetic codes of the companion paper,this highly structured class includes other beautiful examples and we proposethe classification of $Q$-polynomial completely regular codes in the Hamminggraphs. A key result is Theorem 3.10 which finds that the $Q$-polynomialcondition is equivalent to the presence of a certain Leonard pair. Thisconnection has impact in two directions. First, the Leonard pairs areclassified and we gain quite a bit of information about the algebraic structureof any code in our class. But also this gives a new setting for the study ofLeonard pairs, one closely related to the classical one where a Leonard pairarises from each thin/dual-thin irreducible module of a Terwilliger algebra ofsome $P$- and $Q$-polynomial association scheme, yet not previously studied. Itis particularly interesting that the Leonard pair associated to some code $C$may belong to one family in the Askey scheme while the distance-regular graphin which the code is found may belong to another.
展开▼